<template>
  <view class="Wodeaccount">
    <view class="Title" v-if="Type == 1">昨日收入</view>
    <view class="Title" v-if="Type == 2">账户余额</view>
    <view class="account pos_r">
      <view class="Yesterdaycard">
        <image src="../../static/images/pulice/pricebg.png" mode="scaleToFill" />
      </view>
      <view class="pos_a msg">
        <!-- 占位符 -->
        <view style="height: 100rpx"></view>
        <view class="Total">
          <view v-if="Type == 1">昨日收入</view>
          <view v-if="Type == 2">账户余额</view>
          <view class="num">{{ baseData.balance }}</view>
        </view>
        <!-- 昨日 余额 -->
        <view class="WithdrawCash" @click="NavTo('/pages/BankCard/WithdrawCash')">
          <view>提现</view>
          <u-icon name="arrow-right" color="#000" size="12"></u-icon>
        </view>
      </view>
    </view>
    <!-- 账户明细 -->
    <view class="AccountDetails">
      <view class="Title">账户明细</view>
      <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="toLower">
        <view class="item flex_al_cen_ju_bet" v-for="item in riderCapitalList" :key="item">
          <view class="left">
            <view>{{ item.remark }}</view>
            <view class="desc">{{ item.createTime }}</view>
          </view>
          <view class="right"> +{{ item.singleIncome }} </view>

        </view>
      </scroll-view>
    </view>
  </view>
</template>
<script setup lang="ts">
import { NavTo } from "@/utlis/uni_api";
import { ref, getCurrentInstance } from "vue";
import income_balance from "@/Hooks/Wode/income_balance"
import { onLoad } from "@dcloudio/uni-app";
const { proxy } = getCurrentInstance() as any;
const { accountBalance, riderCapitalList, baseData, scrollTop, toLower } = income_balance(proxy)
const Type = ref(1);
// onMounted(() => {

// });
onLoad(() => {

  Type.value = proxy.$page.options.Type;
  accountBalance(Type.value)


})

</script>
<style lang="scss" scoped>
@import "../../static/css/Wode/account.scss";
</style>
